package org.omich.loaves.gui.view;

import org.omich.loaves.gui.GuiLoaf;

import android.widget.ListView;

public class LoavesList
{
	private ListView mListView;
	private LoavesListAdapter mAdapter;
	
	public LoavesList (ListView listView)
	{
		mListView = listView;
		mAdapter = new LoavesListAdapter(listView.getContext());
		mListView.setAdapter(mAdapter);
	}
	
	public void setLoaves (GuiLoaf [] loaves)
	{
		mAdapter.setLoaves(loaves);
	}
	
	public GuiLoaf getLoaf (int position)
	{
		return (GuiLoaf)mAdapter.getItem(position);
	}
}
